<div ng-controller="ProductCtrl" ng-init="listAction()">
    <ul class="sui-breadcrumb">
        <li><a href="#/product/list">{{'product'| translate}}{{'List'| translate}}</a></li>
        <li class="active">
            {{"List"|translate}}
            <a href="#/product/add" id="addNew" class="sui-btn btn-primary">+{{'add_new' | translate}}</a>
        </li>
        <span class="sui-form sui-form pull-right"> 
          <input type="text"  placeholder="{{'productid'|translate}}"  ng-model="pid">
          <input type="text"  placeholder="{{'Name'|translate}}"  ng-model="name">
          <button class="sui-btn btn-primary" type="submit" ng-click="getProductcatList()">{{'search'|translate}}</button>
        </span>
    </ul>
    <table class="sui-table table-bordered">
        <thead>
            <tr>
                <th>{{'item_image'|translate}}</th>
                <th>{{'item_id'|translate}}</th>
                <th>{{'title'|translate}}</th>
                <th>{{'standard'|translate}}{{'price'|translate}}</th>
                <th>{{'retail'|translate}}</th>
                <th>{{'item_unit_id'|translate}}</th>
                <th>{{'item_stocks_warning'|translate}}</th>
                <th>{{'remark'|translate}}</th>
                <th>{{'operation'|translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="list in productslist">
                <td><img ng-src="{{list.image_url}}" width="60" /></td>
                <td>{{list.outer_id}}
                    <br> {{list.created_at | ddtt}}</td>
                <td>{{list.name}}</td>
                <!-- <td>{{list.volume}} -->
                </td>
                <td>
                	{{list.retail_price_high}}
                </td>
                <td>
                	{{'retail_price_high'|translate}}:{{list.retail_price_high}}<br>
                   {{'retail_price_low'|translate}}:{{list.retail_price_low}}
                </td>
                <td></td>
                <td>{{list.alarm_number}}</td>
                <td>{{list.remark}}</td>
                <td>
                    <a href="#/product/add?pid={{list.pid}}" class="sui-btn btn-success">{{'edit'|translate}}</a>
                    <a href="#/product/info?pid={{list.pid}}" class="sui-btn btn-primary">{{'info'|translate}}</a>
                    <a ng-click="productDelete(list.pid)" class="sui-btn btn-danger">{{'delete'|translate}}</a>
                    <a ng-if="list.status_id==0" ng-click="theshelves(list.pid)" class="sui-btn btn-success">{{'上架'|translate}}</a>
                    <a  ng-if="list.status_id==1" ng-click="shelv(list.pid)" class="sui-btn btn-danger">{{'下架'|translate}}</a>
                </td>
            </tr>
        </tbody>
    </table>
    <!-- 分页start -->
    <pager page-no="1" page-size="pageSize" total="productsTotal" get-data="getProductList(pageNo)"></pager>
    <!-- 分页end -->
</div>
